package com.zjcode.cdcer.service;

import com.chinatechstar.component.commons.supports.PageData;
import com.zjcode.cdcer.model.basic.JsonObj;
import com.zjcode.cdcer.service.fallback.TkmSysOrgServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "zjcode-chronic-disease-cancer-server", fallback = TkmSysOrgServiceFallback.class)
public interface TkmSysOrgService {

    @PostMapping("/cdcerserver/v1/orgsetting/listAllData")
    JsonObj listAllData(@RequestBody PageData pageData);

    @GetMapping("/cdcerserver/v1/orgsetting/getAllProvince")
    JsonObj getAllProvince();

    @GetMapping("/cdcerserver/v1/orgsetting/getAllProvinceCity")
    JsonObj getAllProvinceCity(@RequestParam("parentRegionCode") String parentRegionCode,
                               @RequestParam("user") String user);

    @GetMapping("/cdcerserver/v1/orgsetting/getDistrictAndStreet")
    JsonObj getDistrictAndStreet(@RequestParam("parentRegionCode") String parentRegionCode);

    @PostMapping("/cdcerserver/v1/orgsetting/exportOrgData")
    JsonObj exportOrgData(@RequestBody PageData pageData);
}
